from flask import g, Blueprint, redirect, url_for, request, jsonify, session, render_template
from flask_login import login_user, logout_user

bp = Blueprint("user", __name__, url_prefix="/user")


@bp.route("/login_out", methods=['GET', 'POST'])
def login_out():
    """删除session数据"""
    if session.get("id_user"):
        del session["id_user"]

    logout_user()
    return "success"
